package action.main;

import java.util.List;

import service.MainService;
import entity.Product;

public class NewAction {
	//input
	private int size=8;
	//output
	private List<Product> news;
	//injection
	private MainService mainService;
	public void setMainService(MainService mainService) {
		this.mainService = mainService;
	}
	
	
	public String execute() throws Exception{
		news = mainService.findNew();
		return "success";
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

	public List<Product> getNews() {
		return news;
	}

	public void setNews(List<Product> news) {
		this.news = news;
	}
	
}
